/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author wyr
 */
@Embeddable
public class SongAlbumsongsPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "albumId")
    private int albumId;
    @Basic(optional = false)
    @Column(name = "songId")
    private int songId;

    public SongAlbumsongsPK() {
    }

    public SongAlbumsongsPK(int albumId, int songId) {
        this.albumId = albumId;
        this.songId = songId;
    }

    public int getAlbumId() {
        return albumId;
    }

    public void setAlbumId(int albumId) {
        this.albumId = albumId;
    }

    public int getSongId() {
        return songId;
    }

    public void setSongId(int songId) {
        this.songId = songId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) albumId;
        hash += (int) songId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SongAlbumsongsPK)) {
            return false;
        }
        SongAlbumsongsPK other = (SongAlbumsongsPK) object;
        if (this.albumId != other.albumId) {
            return false;
        }
        if (this.songId != other.songId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.SongAlbumsongsPK[albumId=" + albumId + ", songId=" + songId + "]";
    }

}
